package com.hsp.Demo_12_enum;

/**
 * 定义一个对象，用于创建春夏秋冬
 */
public class Demo_01 {
    public static void main(String[] args) {
        //创建四季
        Season spring = new Season("春天", "万物复苏");
        Season sumer = new Season("夏天", "比较凉快");
        Season autumn = new Season("秋天", "秋高气爽");
        Season winter = new Season("冬天", "真冷");
        System.out.println(spring);
        System.out.println(sumer);
        System.out.println(autumn);
        System.out.println(winter);

    }
}

class Season{
    private String name;
    private String desc;

    public Season(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public String toString() {
        return "Season{" +
                "name='" + name + '\'' +
                ", desc='" + desc + '\'' +
                '}';
    }
}
